package com.qf.web.controller;

import com.github.pagehelper.PageInfo;
import com.qf.entity.Pagination;
import com.qf.entity.Result;
import com.qf.entity.SetMeal;
import com.qf.service.SetMealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/setmeal1")
public class SetMealController {

    @Autowired
    private SetMealService setMealService;

    @GetMapping
    public Result findByPage(Pagination pagination){
        PageInfo<SetMeal> PageInfo = setMealService.findPageAndName(pagination);

        return Result.success(PageInfo);
    }
}
